#ifndef __SPI_H
#define __SPI_H

#include "gd32f10x.h"

uint8_t spi_read_write_byte(uint32_t spi_periph, uint8_t data);
void spi_write_data(uint32_t spi_periph, uint8_t *data, uint16_t len);
void spi_read_data(uint32_t spi_periph, uint8_t *data, uint16_t len);
void gd_hal_spi_init(void);

#endif
